package spring.ioc;

import org.apache.naming.factory.BeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.ClassPathResource;

public class IocMain {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		ClassPathResource resource=new ClassPathResource("spring/ioc/IocBeans.xml");
		XmlBeanFactory factory=new XmlBeanFactory(resource);
		
		IoCService service=(IoCService) factory.getBean("iocService");
		service.display();
	}

}
